package depotTests;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import java.util.ArrayList;
import java.util.HashSet;

import org.junit.Test;

import depot.Parcel;


/**
 * Tests for ?
 *
 * @author Ionut Iordache, Nikky Afunugo, Dave Bond
 */
public class ParcelTest {
	
	private ArrayList<Parcel> parcelList;
	
	@Test(expected = IllegalArgumentException.class)
	public  void invalidDataSupplied1() {
		int[] dim1 = {35,35,34};
		Parcel pcl = new Parcel("V000112", dim1, 2.55, 2);
		parcelList.add(pcl);
	}
	
	@Test
	public  void invalidDateSupplied2() {
		try {
			int[] dim1 = {35,35,34};
			Parcel pcl = new Parcel("V000112", dim1, 2.55, 2);
			parcelList.add(pcl);
			fail("Invalid data supplied - should throw exception");
		}
		catch (IllegalArgumentException e) {
			assertTrue(e.getMessage().contains("V000112"));
		}
	}
	
	@Test
	/*public void testGetParcelByID() {
		//this one should not be found
		assertEquals (null, parcelList.getParcelByID("E000100"));
		
		//what was found is what was searched for
		Parcel idFound = parcelList.getParcelByID("E000100");
		assertTrue (idFound.equals(new Parcel("E000100")));
		
		//maybe also search limits - for first and last item
		
	} */
	

    public void thisAlwaysPasses() {
    }

}
